<template>
	<view class="container">
		<text>这是个人中心 (tabBar 页面)</text>
		<text class="route-info">当前路由: {{currentRoute}}</text>
		<!-- 知识点：从tabBar页可以跳转到非tabBar页 -->
		<button @click="goToDetail">跳转到详情页</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				currentRoute: ''
			}
		},
		onLoad() {
			this.currentRoute = this.route;
		},
		methods: {
			goToDetail() {
				uni.navigateTo({
					url: '/pages/detail/detail'
				})
			}
		}
	}
</script>
<style scoped>
	.container {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-top: 100rpx;
	}

	.route-info {
		color: #8f8f94;
		margin-top: 20rpx;
		font-size: 28rpx;
	}

	button {
		margin-top: 50rpx;
	}
</style>